package com.ylbh.modules.usercoupon.controller;

import com.ylbh.common.pojo.usercoupon.dto.UserCouponDTO;
import com.ylbh.common.utils.CommonResult;
import com.ylbh.common.utils.Ref;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.ylbh.modules.usercoupon.service.ShoppingUserCouponService;
import com.ylbh.common.utils.PageUtils;

/**
 * 优惠券领取记录
 *
 * @author $czx
 * @date 2019-11-19 16:04:09
 */
@RestController
@RequestMapping("coupon")
public class ShoppingUserCouponController {

    @Autowired
    private ShoppingUserCouponService shoppingUserCouponService;

    @ApiOperation("优惠券领取记录")
    @GetMapping("/queryUserCouponRecordList")
    @RequiresPermissions("couponRecord:list")
    public CommonResult queryUserCouponRecordList(UserCouponDTO dto){
        PageUtils page = shoppingUserCouponService.queryUserCouponRecordList(dto);
        return Ref.ok(page);
    }
}
